﻿<dxr:BackstageViewControl xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    x:Class="Luna.UI.Wpf.ApplicationMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:loki="clr-namespace:Loki.UI.Wpf;assembly=Loki.UI.Wpf"
    xmlns:luna="clr-namespace:Luna.UI;assembly=Luna.Core"
    xmlns:local="clr-namespace:Luna.UI.Wpf"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
    mc:Ignorable="d"
    d:DesignHeight="636.8" d:DesignWidth="842.4">
    <dxr:BackstageViewControl.Resources>
        <ResourceDictionary>
            <dx:ImageDataConverter x:Key="ImageDataConverter" />
            <DataTemplate x:Key="DetailCoreTemplate">
                <dx:MeasurePixelSnapper>
                    <dxlc:LayoutControl Orientation="Vertical">
                        <dxlc:LayoutItem Label="Nom :" HorizontalAlignment="Left">
                            <dxe:TextEdit Text="{Binding Row.Name}" />
                        </dxlc:LayoutItem>
                        <dxlc:LayoutItem Label="Login :" HorizontalAlignment="Left">
                            <dxe:TextEdit />
                        </dxlc:LayoutItem>
                        <dxlc:LayoutItem Label="Password :" HorizontalAlignment="Left">
                            <dxe:TextEdit />
                        </dxlc:LayoutItem>
                        <dxlc:LayoutItem HorizontalAlignment="Left">
                            <Button>Test</Button>
                        </dxlc:LayoutItem>
                        <dxlc:LayoutItem HorizontalAlignment="Left">
                            <Button>OK</Button>
                        </dxlc:LayoutItem>
                    </dxlc:LayoutControl>
                </dx:MeasurePixelSnapper>
            </DataTemplate>
            <ControlTemplate x:Key="detailContainerTemplate" TargetType="{x:Type ContentControl}">
                <Border BorderThickness="5" BorderBrush="{TemplateBinding BorderBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="12,12,12,12" Background="{TemplateBinding Background}">
                    <ContentPresenter />
                </Border>
            </ControlTemplate>
            <DataTemplate x:Key="expandableRowDetailTemplate">
                <StackPanel Orientation="Vertical">
                    <dx:MeasurePixelSnapper>
                        <ContentPresenter x:Name="defaultRowPresenter" Content="{Binding}" ContentTemplate="{Binding View.DefaultDataRowTemplate}" />
                    </dx:MeasurePixelSnapper>
                    <dx:DXExpander IsExpanded="{Binding Path=IsSelected}" HorizontalExpand="None" VerticalExpand="FromTopToBottom">
                        <ContentControl Template="{StaticResource detailContainerTemplate}" Content="{Binding}" ContentTemplate="{DynamicResource DetailCoreTemplate}" />
                    </dx:DXExpander>
                </StackPanel>
            </DataTemplate>
        </ResourceDictionary>
    </dxr:BackstageViewControl.Resources>
    <dxr:BackstageButtonItem Click="BackstageButtonItem_Click" Content="Nouveau" Command="luna:ApplicationCommands.DATA_NEW" />
    <dxr:BackstageButtonItem Content="Ouvrir une base existante" Command="luna:ApplicationCommands.DATA_OPEN" />
    <dxr:BackstageButtonItem Content="Enregistrer sous"  Command="luna:ApplicationCommands.DATA_SAVE_AS" />
    <dxr:BackstageTabItem Content="Informations" />
    <dxr:BackstageTabItem Content="Connecteurs">
        <dxr:BackstageTabItem.ControlPane>
            <local:ConnectorConfigurationView />
        </dxr:BackstageTabItem.ControlPane>
    </dxr:BackstageTabItem>
</dxr:BackstageViewControl>